package com.fanx.redis.lock.springtest.service;

import com.fanx.redis.lock.spring.annotation.RedisLock;
import org.springframework.stereotype.Service;

@Service
public class RedisLockDemoServiceImpl implements RedisLockDemoService {

	@Override
	@RedisLock(lockName = "order", lockKey = "#id", expireSeconds = 30)
	public void doSomething(long id) throws InterruptedException {
		System.out.println("doSomething execute start...");
		Thread.sleep(20000);
		System.out.println("doSomething execute finished...");
	}

}
